import service from '@/utils/request'

// @Tags Car
// @Summary 创建car表
// @Security ApiKeyAuth
// @accept application/json
// @Produce application/json
// @Param data body model.Car true "创建car表"
// @Success 200 {string} string "{"success":true,"data":{},"msg":"创建成功"}"
// @Router /car/createCar [post]
export const createCar = (data) => {
  return service({
    url: '/car/createCar',
    method: 'post',
    data
  })
}

// @Tags Car
// @Summary 删除car表
// @Security ApiKeyAuth
// @accept application/json
// @Produce application/json
// @Param data body model.Car true "删除car表"
// @Success 200 {string} string "{"success":true,"data":{},"msg":"删除成功"}"
// @Router /car/deleteCar [delete]
export const deleteCar = (data) => {
  return service({
    url: '/car/deleteCar',
    method: 'delete',
    data
  })
}

// @Tags Car
// @Summary 批量删除car表
// @Security ApiKeyAuth
// @accept application/json
// @Produce application/json
// @Param data body request.IdsReq true "批量删除car表"
// @Success 200 {string} string "{"success":true,"data":{},"msg":"删除成功"}"
// @Router /car/deleteCar [delete]
export const deleteCarByIds = (data) => {
  return service({
    url: '/car/deleteCarByIds',
    method: 'delete',
    data
  })
}

// @Tags Car
// @Summary 更新car表
// @Security ApiKeyAuth
// @accept application/json
// @Produce application/json
// @Param data body model.Car true "更新car表"
// @Success 200 {string} string "{"success":true,"data":{},"msg":"更新成功"}"
// @Router /car/updateCar [put]
export const updateCar = (data) => {
  return service({
    url: '/car/updateCar',
    method: 'put',
    data
  })
}

// @Tags Car
// @Summary 用id查询car表
// @Security ApiKeyAuth
// @accept application/json
// @Produce application/json
// @Param data query model.Car true "用id查询car表"
// @Success 200 {string} string "{"success":true,"data":{},"msg":"查询成功"}"
// @Router /car/findCar [get]
export const findCar = (params) => {
  return service({
    url: '/car/findCar',
    method: 'get',
    params
  })
}

// @Tags Car
// @Summary 分页获取car表列表
// @Security ApiKeyAuth
// @accept application/json
// @Produce application/json
// @Param data query request.PageInfo true "分页获取car表列表"
// @Success 200 {string} string "{"success":true,"data":{},"msg":"获取成功"}"
// @Router /car/getCarList [get]
export const getCarList = (params) => {
  return service({
    url: '/car/getCarList',
    method: 'get',
    params
  })
}

